<script lang="ts" setup>
import CooperationNav from '~/components/CooperationNav/index.vue'
import APINotice from '~/api/notice/index'
import APIAgreement from '~/api/agreement/index'

definePageMeta({
    showSmallSearchBox: true,
})

const loading = shallowRef<boolean>(false)
const list = ref<any>([])

function getProtocolTitle() {
    loading.value = true
    APIAgreement.getProtocolTitle('help').then(({ data }) => {
        list.value = data
    }).finally(() => {
        loading.value = false
    })
} getProtocolTitle()
const column = [{
    label: '入职心安元素',
    jumpLink: '/entry'
}, {
    label: '合作伙伴',
    jumpLink: '/cooperation'
}, {
    label: '在线客服',
    jumpLink: '/service'
}, {
    label: '帮助中心',
    jumpLink: '/help',
    active: true
}, {
    label: '意见反馈',
    jumpLink: '/feedback'
}]
</script>

<template>
    <div class="help">
        <ColumnNav class="left-nav" :column="column" />
        <div class="help-content" v-loading="loading">
            <el-collapse v-if="list.length != 0">
                <el-collapse-item v-for="item in list" :key="item.id" :title="item.title">
                    <div v-html="item.content">
                    </div>
                </el-collapse-item>
            </el-collapse>
        </div>
        <div style="clear: both;"></div>
    </div>
</template>

<style lang="less" scoped>
.help {
    width: 1250px;
    margin: 0 auto;
    margin-top: 100px;
    margin-bottom: 300px;

    .left-nav {
        float: left;
        margin-right: 50px;
    }

    .help-content {
        min-height: 200px;
        width: 1000px;
        float: left;
        font-family: 'SOURCEHANSANSCN-EXTRALIGHT';

        &:deep(.el-collapse-item__header) {
            font-family: 'SOURCEHANSANSCN-LIGHT';
        }
    }
}
</style>